<!-- Created by henian.xu on 2018/11/9. -->

<template>
    <Page class="container">
        <Panel label="供应商入驻">
            <div
                class="row"
                style="margin-top: 50px;margin-bottom: 50px;">
                <div class="col-3">&nbsp;</div>
                <div class="col-18">
                    <StepProgressBar
                        v-model="currentStep"
                        :data="['账号信息','企业信息','等待审核结果']"/>
                </div>
                <div class="col-3">&nbsp;</div>
            </div>
            <div class="row">
                <div class="col-5">&nbsp;</div>
                <div class="col-14">
                    <div
                        class="ta-c ma-t ma-b"
                        v-if="currentStep===3">
                        <div class="tc-main">进度查询码:<span style="font-size: 30px;font-weight: bold;">{{ authInfo.queryCode }}</span></div>
                        <div style="font-size: 18px; font-weight: bold;">
                            您的入驻申请已提交，我们将在1-3个工作日内进行审核。<br>
                            您可以通过查询码查询审核进度，审核结果将会以邮件和手机短信通知您！
                        </div>
                    </div>
                </div>
                <div class="col-5">&nbsp;</div>
            </div>
            <div class="ta-c">
                <linker
                    to="/"
                    ssr
                    class="btn btn-big btn-main">返回首页</linker>
                <linker
                    to="/register/reviewProgress"
                    ssr
                    class="btn btn-big btn-main">查询进度</linker>
            </div>
        </Panel>
    </Page>
</template>

<script>
import PageMixin from '~/mixins/page.js';
export default {
    mixins: [PageMixin],
    /*asyncData({ app, query }) {
        console.log(query);
        return app.$axios
            .get('/rpc/buyer/mb/buyerAuthInfo/getAuthInfoDetail', {
                queryCode: query.queryCode,
                account: query.accountEmail || query.accountMobile,
            })
            .then(json => {
                const result = json.data.data;
                return { result };
            });
    },*/
    data() {
        return {
            currentStep: 3,
            authInfoDetail: {},
            authInfo: {},
        };
    },
    head() {
        return {
            title: '等待审核结果',
        };
    },
    methods: {},
    mounted() {
        this.$axios
            .get('/rpc/buyer/mb/buyerAuthInfo/getAuthInfoDetail', {
                queryCode: this.$route.query.queryCode,
                account: this.$route.query.accountEmail || this.$route.query.accountMobile,
            })
            .then(json => {
                const result = json.data.data;
                this.authInfoDetail = result;
                this.authInfo = this.authInfoDetail.authInfo;
                return { result };
            });
    },
};
</script>

<style lang="scss">
.captcha {
    background-size: 100% 100%;
}
</style>
